package com.suke.czx.modules.performanceconfig.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.suke.czx.common.validate.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 应用模块名称: 绩效参数
 * 代码描述: 绩效参数实体
 * copyright: AUZAR ALL RIGHTS RESERVED
 * company: AUZAR
 *
 * @author: 颜米晨
 * @date: 2022/06/11 14:19
 */
@Data
@ApiModel(value = "绩效参数实体")
@EqualsAndHashCode(callSuper = true)
public class PerformanceConfig extends Model<PerformanceConfig> {

    @ApiModelProperty(value = "绩效参数id")
    @TableId(value = "performance_config_id", type = IdType.AUTO)
//    @NotNull(groups = {PerformanceConfigUpdateGroup.class}, message = "绩效参数id不能为空")
    private Long performanceConfigId;

    @ApiModelProperty(value = "年份")
    @NotBlank(groups = {PerformanceConfigSaveGroup.class, PerformanceConfigMarginAndNoteUpdateGroup.class, PerformanceConfigCopyGroup.class}, message = "年份不能为空")
    private String year;

    @ApiModelProperty(value = "版本")
    @NotNull(groups = {PerformanceConfigSaveGroup.class, PerformanceConfigMarginAndNoteUpdateGroup.class, PerformanceConfigCopyGroup.class}, message = "版本不能为空")
    private Integer version;

    @ApiModelProperty(value = "岗位一类")
    @NotNull(groups = {PerformanceConfigSaveGroup.class}, message = "岗位一类不能为空")
    @EnumValue(groups = {PerformanceConfigSaveGroup.class}, intValues = {1, 2, 3, 4}, message = "岗位一类只能是1,2,3,4")
    private Integer job1;

    @ApiModelProperty(value = "岗位二类")
//    @NotNull(groups = {PerformanceConfigSaveGroup.class}, message = "岗位二类不能为空")
//    @EnumValue(groups = {PerformanceConfigSaveGroup.class}, intValues = {1, 2, 3, 4, 5, 6, 7, 8, 9}, message = "岗位二类只能是1,2,3,4,5,6,7,8,9")
    private Integer job2;

    @ApiModelProperty(value = "毛利率去除率")
    @NotNull(groups = {PerformanceConfigMarginAndNoteUpdateGroup.class}, message = "毛利率去除率不能为空")
    private BigDecimal marginRemovalRate;

    @ApiModelProperty(value = "参数值1")
    private BigDecimal ext1;

    @ApiModelProperty(value = "参数值2")
    private BigDecimal ext2;

    @ApiModelProperty(value = "参数值3")
    private BigDecimal ext3;

    @ApiModelProperty(value = "参数值4")
    private BigDecimal ext4;

    @ApiModelProperty(value = "参数值5")
    private BigDecimal ext5;

    @ApiModelProperty(value = "参数值6")
    private BigDecimal ext6;

    @ApiModelProperty(value = "参数值7")
    private BigDecimal ext7;

    @ApiModelProperty(value = "参数值8")
    private BigDecimal ext8;

    @ApiModelProperty(value = "参数值9")
    private BigDecimal ext9;

    @ApiModelProperty(value = "参数值10")
    private BigDecimal ext10;

    @ApiModelProperty(value = "参数值11")
    private BigDecimal ext11;

    @ApiModelProperty(value = "参数值12")
    private BigDecimal ext12;

    @ApiModelProperty(value = "参数值13")
    private BigDecimal ext13;

    @ApiModelProperty(value = "参数值14")
    private BigDecimal ext14;

    @ApiModelProperty(value = "参数值15")
    private BigDecimal ext15;

    @ApiModelProperty(value = "范围值1")
    private BigDecimal range1;

    @ApiModelProperty(value = "范围值2")
    private BigDecimal range2;

    @ApiModelProperty(value = "范围值3")
    private BigDecimal range3;

    @ApiModelProperty(value = "范围值4")
    private BigDecimal range4;

    @ApiModelProperty(value = "范围值5")
    private BigDecimal range5;

    @ApiModelProperty(value = "范围值6")
    private BigDecimal range6;

    @ApiModelProperty(value = "发放时机")
    private String grantType;

    @ApiModelProperty(value = "备注")
    private String note;

    @ApiModelProperty(value = "删除标记  0：删除   1：正常")
    private Integer del;

    @ApiModelProperty(value = "创建者id")
    private Long creator;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新者id")
    private Long updater;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "绩效参数ids")
    @TableField(exist = false)
    private String performanceConfigIds;

}
